<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/8/30 0030
 * Time: 下午 4:53
 */
namespace app\admin\model;
use think\Model;
class Mydiscount  extends Model{
    protected $insert=[ 'use_status'=>1, 'status'=>1,];
    public function discount(){
        return $this->belongsTo('Discount','discount_id')->field('id,price,name,starttime,endtime,d_status');
    }
}